# Translate post content

Translates the text content of a post to the specified target language. Can return either plain text or HTML formatted translation. Uses automatic translation services to provide the translation.

Endpoint: POST /api/v1/posts/{postId}/translate
Version: 1.0
Security: header

## Path parameters:

  - `postId` (string, required)
    UUID with type prefix
    Example: "us_01hxcvk1hjexere4pvtrj0ymqq"

## Query parameters:

  - `htmlContent` (boolean,null)
    If true, returns HTML-formatted translation instead of plain text

  - `lang` (string, required)
    Target language code for translation
    Enum: "BG", "CS", "DA", "DE", "EL", "EN", "ES", "ET", "FI", "FR", "HU", "ID", "IT", "JA", "KO", "LT", "LV", "NB", "NL", "PL", "PT", "RO", "RU", "SK", "SL", "SV", "TR", "UK", "ZH"

## Response 200 fields (application/json):

  - `text` (string, required)

  - `spoiler_text` (string,null)

  - `media_attachments` (array)

  - `media_attachments.id` (string, required)

  - `media_attachments.description` (string,null, required)

  - `poll` (object,null)

  - `poll.id` (string, required)

  - `poll.options` (array, required)

  - `poll.options.title` (string, required)

  - `detected_source_language` (string,null)

  - `provider` (string,null)

## Response 401 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 403 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation

## Response 404 fields (application/json):

  - `errorCode` (string, required)
    Error code

  - `message` (string, required)
    Error message

  - `docUrl` (string)
    Link to documentation


